-- GENERATED SPELL FOR [The Windreaver] --


function spell0_14454(pUnit, Event) --@Chain Lightning,n/a--
pUnit:FullCastSpellOnTarget(23106,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_14454', 2000, 1)
end

function spell1_14454(pUnit, Event) --@Enveloping Winds,n/a--
pUnit:FullCastSpellOnTarget(23103,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_14454', 12000, 1)
end

function spell2_14454(pUnit, Event) --@Lightning Cloud,n/a--
pUnit:FullCastSpellOnTarget(23105,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_14454', 15000, 1)
end

function spell3_14454(pUnit, Event) --@Shock,n/a--
pUnit:FullCastSpellOnTarget(23104,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_14454', 609, 1)
end

function Sorts_14454(pUnit, Event)
local choix_sorts_14454 = math.random(0, 3)
if choix_sorts_14454 == 0 then
pUnit:RegisterEvent('spell0_14454', 1, 1)
end
if choix_sorts_14454 == 1 then
pUnit:RegisterEvent('spell1_14454', 1, 1)
end
if choix_sorts_14454 == 2 then
pUnit:RegisterEvent('spell2_14454', 1, 1)
end
if choix_sorts_14454 == 3 then
pUnit:RegisterEvent('spell3_14454', 1, 1)
end
end

function mob14454_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_14454', math.random(1500, 3000), 1)
end

function mob14454_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob14454_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob14454_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(14454, 1, 'mob14454_Action')
RegisterUnitEvent(14454, 2, 'mob14454_Leave')
RegisterUnitEvent(14454, 3, 'mob14454_Kill')
RegisterUnitEvent(14454, 4, 'mob14454_Die')
